using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Utils
{   //判断是否成功后调用对应的方法
    public class ApiRetrunsHelper
    {
        //成功
        public static ApiReturn  Success(dynamic data){
            return new ApiReturn(){
                Code=200,
                Message = "Ok",
                Data = data
            };
        }

        //失败
        public static ApiReturn Failed(string msg){
            return new ApiReturn(){
                Code=500,
                Message = msg,
                Data = null
            };
        }
    }
}